<?php

/**
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: magic_frame.php 6757 2010-03-25 09:01:29Z cnteacher $
 */

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}

$idtype = 'picid';
magic_check_idtype($id, $idtype);

if(submitcheck("usesubmit")) {

	$_POST['frame'] = intval($_POST['frame']);
	DB::update('home_pic', array('magicframe'=>$_POST['frame']), array('picid'=>$id, 'uid'=>$_G['uid']));

	magic_use($mid, array('id'=>$id, 'idtype'=>$idtype), true);
	showmessage('magicuse_success', dreferer().'&quickforward=1');
}

?>